const constant = {
  userInfo: 'userInfo',
  menus: 'menus',
  ruleNames: 'ruleNames',
  tabList: 'tabList',
  appTitle: '新东方智能化通用前端模板',
  filter: {
    fuzzyString: 'text',// 字符串模糊查询
    singleSelect: 'single',// 单选=
    multSelect: 'mult'// 多选=
  }
}

const parseMenus = (menus) => {
  menus.forEach(menu => {
    menu.frontpath = menu.url
    menu.child = [...menu.children]
    if(menu.children)
      menu.children = [...menu.children.map(item => item.frontpath = item.url)]
    
  });

  return menus;
}

export { constant, parseMenus }